<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <include file="Public:common_file" />
    <meta name="description" content="{$info.description}">
    <meta name="keywords" content="{$info.keywords}">
    <title>{$info.title}-购物车</title>
</head>
<body>
	<div class="head" style="background-color:#f23030;">
        <div class="left">
            LOGO<!-- <i class="icon-reorder"></i> -->
        </div>
        <div class="center">
            <p><i class="icon-shopping-cart"></i> 购物车</p>
        </div>
        <div class="right">
            
        </div>
    </div>
    <div class="cartlist">

    	<div class="cart" id="cart1">
    		<div class="img">
    			<img class="lazy img-rounded" data-original="/Public/img/t1.jpg">
    		</div>
    		<div class="right">
    			<div class="title">【推荐】飞毛腿车载充电器手机通用 点烟器USB转接头一拖二汽车充</div>
				<div class="price_del" >
					<div class="price">￥18.90</div>
				</div>
				<div class="count_del">
					<div class="count">
						<div class="input-group">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="less(1)">
									<i class="fa fa-minus-square-o" aria-hidden="true"></i>
								</button>
							</div>
							<input id="put1" type="number" class="form-control" value="3" style="height:25px;">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="add(1)">
									<i class="fa fa-plus-square-o" aria-hidden="true"></i>
								</button>
							</div>
						</div>

					</div>
					<div class="del" onclick="del(1)">
						<i class="icon-trash"></i>
					</div>
				</div>
    		</div>
    	</div>

    	<div class="cart" id="cart2">
    		<div class="img">
    			<img class="lazy img-rounded" data-original="/Public/img/t2.jpg">
    		</div>
    		<div class="right">
    			<div class="title">【推荐】飞毛腿车载充电器手机通用 点烟器USB转接头一拖二汽车充</div>
				<div class="price_del" >
					<div class="price">￥18.90</div>
				</div>
				<div class="count_del">
					<div class="count">
						<div class="input-group">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="less(2)">
									<i class="icon-minus-sign"></i>
								</button>
							</div>
							<input id="put2" type="number" class="form-control" value="3" style="height:25px;">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="add(2)">
									<i class="icon-plus-sign"></i>
								</button>
							</div>
						</div>

					</div>
					<div class="del" onclick="del(2)">
						<i class="icon-trash"></i>
					</div>
				</div>
    		</div>
    	</div>

    	<div class="cart" id="cart3">
    		<div class="img">
    			<img class="lazy img-rounded" data-original="/Public/img/t3.jpg">
    		</div>
    		<div class="right">
    			<div class="title">【推荐】飞毛腿车载充电器手机通用 点烟器USB转接头一拖二汽车充</div>
				<div class="price_del" >
					<div class="price">￥18.90</div>
				</div>
				<div class="count_del">
					<div class="count">
						<div class="input-group">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="less(3)">
									<i class="icon-minus-sign"></i>
								</button>
							</div>
							<input id="put3" type="number" class="form-control" value="3" style="height:25px;">
							<div class="input-group-btn">
								<button type="button" class="btn btn-default btn-xs" style="height:25px;" onclick="add(3)">
									<i class="icon-plus-sign"></i>
								</button>
							</div>
						</div>

					</div>
					<div class="del" onclick="del(3)">
						<i class="icon-trash"></i>
					</div>
				</div>
    		</div>
    	</div>

    	

    </div>

    <div class="buy_price">
    	<div class="price">共计￥<b>158.88</b></div>
    	<div class="buy" onclick="buy()">立即结算</div>
    </div>

	<include file="Public:foot" />

	<script type="text/javascript">
		function buy(){
			if (confirm("共计￥158.88元，是否结算？")) {
				location.href="{:U('Pay/index')}";
			}
		}

		function del(id){
			if (confirm("确认删除？")) {
				$( "#cart"+id ).effect( "drop");
			}
		}
		function add(id){
			var value = $('#put'+id).val();
			$('#put'+id).val(parseInt(value)+1);
		}

		function less(id){
			var value = $('#put'+id).val();
			value = parseInt(value)-1;
			if (value > 0) {
				$('#put'+id).val(value);
			}else{
				del(id);
			}
		}
		imgload();
	</script>
</body>
</html>